#include<iostream>
using namespace std;
int main ()
{
	int i,j,a[4][4],n=1;
	for (j=0;j<=3;j++)
	    for(i=j;i<=3;i++)
	       {
	       	  a[i][j]=n;
	       	  a[j][i]=a[i][j];
	       	  n++;
		   }
	for(i=0;i<4;i++){
	   for(j=0;j<4;j++)
	      cout<<a[i][j]<<" ";
      cout<<"\n";
}
	return 0;
} 
